﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Threading;

namespace MedicalSelfserviceTerminals.CustomUI
{
    /// <summary>
    /// UCBottomBar.xaml 的交互逻辑
    /// </summary>
    public partial class UCBottomBar : UserControl
    {
        public UCBottomBar()
        {
            InitializeComponent();
            DispatcherTimer dt = new DispatcherTimer();
            dt.Interval = TimeSpan.FromSeconds(1);
            dt.Tick += new EventHandler(dt_Tick);//调用函数
            dt.Start();
        }

        void dt_Tick(object sender, EventArgs e)
        {
            this.tbTime.Text = DateTime.Now.ToLongDateString() + " " + DateTime.Now.ToLongTimeString();//可以对界面元素进行更改
        }
    }
}
